﻿<!--
 Copyright © 2013 Nokia Corporation. All rights reserved.
 Nokia and Nokia Connecting People are registered trademarks of Nokia Corporation. 
 Other product and company names mentioned herein may be trademarks
 or trade names of their respective owners. 
 See LICENSE.TXT for license information.
-->

<phone:PhoneApplicationPage
    x:Class="MagnifierApp.Pages.ViewfinderPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="False">
    
    <!--Toolkit page transititions-->
    <toolkit:TransitionService.NavigationInTransition>
        <toolkit:NavigationInTransition>
            <toolkit:NavigationInTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardIn"/>
            </toolkit:NavigationInTransition.Backward>
            <toolkit:NavigationInTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardIn"/>
            </toolkit:NavigationInTransition.Forward>
        </toolkit:NavigationInTransition>
    </toolkit:TransitionService.NavigationInTransition>
    <toolkit:TransitionService.NavigationOutTransition>
        <toolkit:NavigationOutTransition>
            <toolkit:NavigationOutTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardOut"/>
            </toolkit:NavigationOutTransition.Backward>
            <toolkit:NavigationOutTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardOut"/>
            </toolkit:NavigationOutTransition.Forward>
        </toolkit:NavigationOutTransition>
    </toolkit:TransitionService.NavigationOutTransition>

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid x:Name="ContentPanel">
            <Canvas x:Name="Canvas" Tap="Canvas_Tap" Width="800" Height="480"
                    HorizontalAlignment="Center" VerticalAlignment="Center">
                <Canvas.Background>
                    <VideoBrush x:Name="ViewfinderVideoBrush" Stretch="Uniform"/>
                </Canvas.Background>
                
                <Border x:Name="FocusBracket" Width="80" Height="80"
                        BorderBrush="White" BorderThickness="2" Margin="-40"
                        Visibility="Collapsed" CornerRadius="360"/>

                <Image x:Name="FreezeImage" Visibility="Collapsed" Stretch="Uniform"
                       Width="800" Height="480"/>
            </Canvas>
        </Grid>
        
        <ProgressBar x:Name="ProgressBar" Visibility="Collapsed" IsIndeterminate="False" VerticalAlignment="Top"/>
    </Grid>

    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar Opacity="0.5"
                              ForegroundColor="{StaticResource MagnifierAppApplicationBarForegroundColor}"
                              BackgroundColor="{StaticResource MagnifierAppApplicationBarBackgroundColor}">
            <!-- populated from code -->
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>